package schedulingScheme;

import helper.Config;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;

public class Alg {
	//sensory losujemy
    private static final Random random = Config.getSalt();

    public static List<SensorNode> generateSensors(){
        List<SensorNode> l = new ArrayList<SensorNode>(Config.getSensorNumber());
        for (int i = 0; i < Config.getSensorNumber(); i++) {
            l.add(new SensorNode(random.nextDouble() * Config.getX(), random.nextDouble() * Config.getY(), Config.getSensingRadius(), Config.getBattery()));
        }
        return l;
    }

    public static List<POI> generatePOIs() {
        List<POI> POIs = new ArrayList<POI>();
        for (double d1 = 0; d1 < 100; d1 += Config.getPOIdistance()) {
            for (double d2 = 0; d2 < 100; d2 += Config.getPOIdistance()) {
                POIs.add(new POI(d1, d2));
            }
        }

//        for (int i = 0; i < Config.getNumberOfPOIs(); i++) {
//            POIs.add(new POI(random.nextDouble() * Config.getX(), random.nextDouble() * Config.getY()));
//        }
        return POIs;

    }


	
	public static void main(String[] args) {

		List<SensorNode> l = new ArrayList<SensorNode>(Config.getSensorNumber());
		for (int i = 0; i < Config.getSensorNumber(); i++) {
			l.add(new SensorNode(Math.random() * Config.getX(), Math.random()
					* Config.getY(), Config.getSensingRadius(), Config
					.getBattery()));
		}
		List<POI> POIs = new ArrayList<POI>();
		for (double x = Config.getPOIdistance(); x < Config.getX(); x+= Config.getPOIdistance()){
			for (double y = Config.getPOIdistance(); y < Config.getX(); y+= Config.getPOIdistance()){
				POIs.add(new POI(x,y));
			}
			
		}
//		boolean[][] sensorPOIMapping = new boolean[l.size()][POIs.size()];
		//to jest bardzo rzadka macierz
		//TODO zmieni� reprezentacj�
		
		
		
	}
	//wstawiamy poi
	//tworzymy mapping

}
